const path = require("path");
const low = require("lowdb");
const FileSync = require("lowdb/adapters/FileSync");

const tables = ["apps", "day_money", "logs", "mobile_apps", "mobiles"];

tables.forEach((table) => {
  const adapter = new FileSync(path.join(__dirname, table + ".json"));
  const db = low(adapter);
  exports[table] = db;
});
